<!DOCTYPE html>
<html lang="zh" ng-app="app" ng-controller="CreateServerCtrl">

<head>
	<meta charset="UTF-8">
	<title>新建链接</title>
	<link href="./css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="./scripts/angular.min.js"></script>
    <script type="text/javascript" src="./scripts/angular-ui-router.min.js"></script>
    <script type="text/javascript" src="./scripts/ui-bootstrap-tpls-3.0.4.min.js"></script>
	<script type="text/javascript" src="./scripts/electangular.js"></script>
	<script type="text/javascript" src="./src/App.js"></script>
	<script type="text/javascript" src="./src/CreateServerCtrl.js"></script>
</head>

<body>
	<div class="container-fluid">
		<form>
			<div class="form-group">
				<label for="name">别名</label>
				<input type="text" class="form-control"ng-model="server.name" placeholder="">
				<small class="form-text text-muted">别名不能为空且不能重复</small>
			</div>
			<div class="form-group">
				<label for="host">服务器</label>
				<input type="text" class="form-control" ng-model="server.host" placeholder="">
				<small class="form-text text-muted">请输入正确的服务器IP地址或HOST NAME</small>
			</div>
			<div class="form-group">
				<label for="port">端口</label>
				<input type="text" class="form-control" ng-model="server.port" placeholder="默认为6379">
			</div>
			<div class="form-group">
				<label for="auth">密码</label>
				<input type="text" class="form-control" ng-model="server.auth" placeholder="">
				<small  class="form-text text-muted">对应Redis中的Auth参数，没有可以不填</small>
			</div>
			<div class="form-group">
				<label for="pattern">过滤器</label>
				<input type="text" class="form-control" ng-model="server.pattern" placeholder="默认为所有（*）">
				<small class="form-text text-muted">如果服务器中的KEY较多，建议使用过滤器选择想要展示的key，默认显示所有</small>
			</div>
			<button type="button" ng-click="test()" ng-disabled="isTesting" ng-class="testStyle" class="btn">{{testText}}</button>
            <button type="button" ng-click="save()" class="btn btn-primary">确认创建</button>
            <button type="button" ng-click="close()" class="btn btn-info">取消</button>
		</form>
	</div>
</body>

</html>
